home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 317 / asmsrc / struc-sy.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-20  |  2.2 KB  |  62 lines

  1. /* struct_symbol.h - */
  2.  
  3. /* Copyright (C) 1987 Free Software Foundation, Inc.
  4.  
  5. This file is part of Gas, the GNU Assembler.
  6.  
  7. The GNU assembler is distributed in the hope that it will be
  8. useful, but WITHOUT ANY WARRANTY.  No author or distributor
  9. accepts responsibility to anyone for the consequences of using it
  10. or for whether it serves any particular purpose or works at all,
  11. unless he says so in writing.  Refer to the GNU Assembler General
  12. Public License for full details.
  13.  
  14. Everyone is granted permission to copy, modify and redistribute
  15. the GNU Assembler, but only under the conditions described in the
  16. GNU Assembler General Public License.  A copy of this license is
  17. supposed to have been given to you along with the GNU Assembler
  18. so you can know your rights and responsibilities.  It should be
  19. in a file named COPYING.  Among other things, the copyright
  20. notice and this notice must be preserved on all copies.  */
  21.  
  22. #ifdef atarist
  23. #include <gnu-out.h>
  24. #else
  25. #ifdef hpux
  26. #include <a.out.h>
  27. #else
  28. #include "a.out.h"        /* Needed to define struct nlist. Sigh. */
  29. #endif
  30. #endif
  31.  
  32. struct symbol            /* our version of an nlist node */
  33. {
  34.   struct nlist    sy_nlist;    /* what we write in .o file (if permitted) */
  35.   long unsigned sy_name_offset;    /* 4-origin position of sy_name in symbols */
  36.                 /* part of object file. */
  37.                 /* 0 for (nameless) .stabd symbols. */
  38.                 /* Not used until write_object_file() time. */
  39.   long int    sy_number;    /* 24 bit symbol number. */
  40.                 /* Symbol numbers start at 0 and are */
  41.                 /* unsigned. */
  42.   struct symbol * sy_next;    /* forward chain, or NULL */
  43.   struct frag *    sy_frag;    /* NULL or -> frag this symbol attaches to. */
  44.   struct symbol *sy_forward;    /* value is really that of this other symbol */
  45. };
  46.  
  47. typedef struct symbol symbolS;
  48.  
  49. #define sy_name        sy_nlist .n_un. n_name
  50.                 /* Name field always points to a string. */
  51.                 /* 0 means .stabd-like anonymous symbol. */
  52. #define sy_type     sy_nlist.    n_type
  53. #define sy_other    sy_nlist.    n_other
  54. #define sy_desc        sy_nlist.    n_desc
  55. #define sy_value    sy_nlist.    n_value
  56.                 /* Value of symbol is this value + object */
  57.                 /* file address of sy_frag. */
  58.  
  59. typedef unsigned valueT;    /* The type of n_value. Helps casting. */
  60.  
  61. /* end: struct_symbol.h */
  62.